<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>CMU462 Library: /Users/Sky/Dropbox/Projects/CMU462/private/p3/CMU462/include/CMU462/renderer.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMU462 Library
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Computer Graphics</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_93cde9e1f49b119e2b24d2ae2dcc682a.html">CMU462</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">renderer.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef CMU462_RENDERER_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define CMU462_RENDERER_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;CMU462.h&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_c_m_u462.html">CMU462</a> {</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="class_c_m_u462_1_1_renderer.html">   21</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_c_m_u462_1_1_renderer.html">Renderer</a> {</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="class_c_m_u462_1_1_renderer.html#ae28a99fd51d4f13c47e83d9a1ec86f77">   29</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="class_c_m_u462_1_1_renderer.html#ae28a99fd51d4f13c47e83d9a1ec86f77">~Renderer</a>( <span class="keywordtype">void</span> ) { }</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_m_u462_1_1_renderer.html#ab18e62c5190185e655ff9f9ac955b2fd">init</a>( <span class="keywordtype">void</span> ) = 0;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_m_u462_1_1_renderer.html#a0946177a793c92fe87cfe022e0c9dc69">render</a>( <span class="keywordtype">void</span> ) = 0;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_m_u462_1_1_renderer.html#a567dd27c55e9cde4781c70c1971f62f1">resize</a>( <span class="keywordtype">size_t</span> w, <span class="keywordtype">size_t</span> h ) = 0;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;  <span class="keyword">virtual</span> std::string <a class="code" href="class_c_m_u462_1_1_renderer.html#a50f605fb9f81b4c9069cc784a37a43b4">name</a>( <span class="keywordtype">void</span> ) = 0;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  <span class="keyword">virtual</span> std::string <a class="code" href="class_c_m_u462_1_1_renderer.html#a0f30953b320b7adb05185a6bb8e40e8a">info</a>( <span class="keywordtype">void</span> ) = 0;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="class_c_m_u462_1_1_renderer.html#ab600bdb3ba9d548f5bc74ecc15a1269d">   79</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_m_u462_1_1_renderer.html#ab600bdb3ba9d548f5bc74ecc15a1269d">cursor_event</a>( <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y ) { }</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="class_c_m_u462_1_1_renderer.html#a8c08a5be2bcca581bf151a69566cb8fe">   89</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_m_u462_1_1_renderer.html#a8c08a5be2bcca581bf151a69566cb8fe">scroll_event</a>( <span class="keywordtype">float</span> offset_x, <span class="keywordtype">float</span> offset_y ) { }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="class_c_m_u462_1_1_renderer.html#aa0a14720964d8d1d00ccaa734bc5ba73">  102</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_m_u462_1_1_renderer.html#aa0a14720964d8d1d00ccaa734bc5ba73">mouse_event</a>( <span class="keywordtype">int</span> key, <span class="keywordtype">int</span> event, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> mods ) { }</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="class_c_m_u462_1_1_renderer.html#a0ce2acdcb7ef53059fb2bafb42b22960">  115</a></span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_c_m_u462_1_1_renderer.html#a0ce2acdcb7ef53059fb2bafb42b22960">keyboard_event</a>( <span class="keywordtype">int</span> key, <span class="keywordtype">int</span> event, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> mods ) { }</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="class_c_m_u462_1_1_renderer.html#a9dfe6c21328153ebd3cf00f2b551563b">  121</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="class_c_m_u462_1_1_renderer.html#a9dfe6c21328153ebd3cf00f2b551563b">use_hdpi_reneder_target</a>() { <a class="code" href="class_c_m_u462_1_1_renderer.html#abcc8d33f95b053ae6daebd9ea5a83ab9">use_hdpi</a> = <span class="keyword">true</span>; }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160; <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="class_c_m_u462_1_1_renderer.html#abcc8d33f95b053ae6daebd9ea5a83ab9">  125</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="class_c_m_u462_1_1_renderer.html#abcc8d33f95b053ae6daebd9ea5a83ab9">use_hdpi</a>; </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;};</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;} <span class="comment">// namespace CMU462</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor">#endif // CMU462_RENDERER_H</span></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_ae28a99fd51d4f13c47e83d9a1ec86f77"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#ae28a99fd51d4f13c47e83d9a1ec86f77">CMU462::Renderer::~Renderer</a></div><div class="ttdeci">virtual ~Renderer(void)</div><div class="ttdoc">Virtual Destructor. </div><div class="ttdef"><b>Definition:</b> renderer.h:29</div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_ab18e62c5190185e655ff9f9ac955b2fd"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#ab18e62c5190185e655ff9f9ac955b2fd">CMU462::Renderer::init</a></div><div class="ttdeci">virtual void init(void)=0</div><div class="ttdoc">Initialize the renderer. </div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_a567dd27c55e9cde4781c70c1971f62f1"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#a567dd27c55e9cde4781c70c1971f62f1">CMU462::Renderer::resize</a></div><div class="ttdeci">virtual void resize(size_t w, size_t h)=0</div><div class="ttdoc">Respond to buffer resize. </div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_a0f30953b320b7adb05185a6bb8e40e8a"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#a0f30953b320b7adb05185a6bb8e40e8a">CMU462::Renderer::info</a></div><div class="ttdeci">virtual std::string info(void)=0</div><div class="ttdoc">Return a brief description of the renderer. </div></div>
<div class="ttc" id="namespace_c_m_u462_html"><div class="ttname"><a href="namespace_c_m_u462.html">CMU462</a></div><div class="ttdef"><b>Definition:</b> CMU462.h:8</div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html">CMU462::Renderer</a></div><div class="ttdoc">Abstract renderer definition. </div><div class="ttdef"><b>Definition:</b> renderer.h:21</div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_a9dfe6c21328153ebd3cf00f2b551563b"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#a9dfe6c21328153ebd3cf00f2b551563b">CMU462::Renderer::use_hdpi_reneder_target</a></div><div class="ttdeci">void use_hdpi_reneder_target()</div><div class="ttdoc">Internal - The viewer will tell the renderer if the screen is in HDPI mode. </div><div class="ttdef"><b>Definition:</b> renderer.h:121</div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_a8c08a5be2bcca581bf151a69566cb8fe"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#a8c08a5be2bcca581bf151a69566cb8fe">CMU462::Renderer::scroll_event</a></div><div class="ttdeci">virtual void scroll_event(float offset_x, float offset_y)</div><div class="ttdoc">Respond to zoom event. </div><div class="ttdef"><b>Definition:</b> renderer.h:89</div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_abcc8d33f95b053ae6daebd9ea5a83ab9"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#abcc8d33f95b053ae6daebd9ea5a83ab9">CMU462::Renderer::use_hdpi</a></div><div class="ttdeci">bool use_hdpi</div><div class="ttdoc">if the render target is using HIDPI </div><div class="ttdef"><b>Definition:</b> renderer.h:125</div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_a0946177a793c92fe87cfe022e0c9dc69"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#a0946177a793c92fe87cfe022e0c9dc69">CMU462::Renderer::render</a></div><div class="ttdeci">virtual void render(void)=0</div><div class="ttdoc">Draw content. </div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_aa0a14720964d8d1d00ccaa734bc5ba73"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#aa0a14720964d8d1d00ccaa734bc5ba73">CMU462::Renderer::mouse_event</a></div><div class="ttdeci">virtual void mouse_event(int key, int event, unsigned char mods)</div><div class="ttdoc">Respond to mouse click event. </div><div class="ttdef"><b>Definition:</b> renderer.h:102</div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_a0ce2acdcb7ef53059fb2bafb42b22960"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#a0ce2acdcb7ef53059fb2bafb42b22960">CMU462::Renderer::keyboard_event</a></div><div class="ttdeci">virtual void keyboard_event(int key, int event, unsigned char mods)</div><div class="ttdoc">Respond to keyboard event. </div><div class="ttdef"><b>Definition:</b> renderer.h:115</div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_a50f605fb9f81b4c9069cc784a37a43b4"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#a50f605fb9f81b4c9069cc784a37a43b4">CMU462::Renderer::name</a></div><div class="ttdeci">virtual std::string name(void)=0</div><div class="ttdoc">Return a name for the renderer. </div></div>
<div class="ttc" id="class_c_m_u462_1_1_renderer_html_ab600bdb3ba9d548f5bc74ecc15a1269d"><div class="ttname"><a href="class_c_m_u462_1_1_renderer.html#ab600bdb3ba9d548f5bc74ecc15a1269d">CMU462::Renderer::cursor_event</a></div><div class="ttdeci">virtual void cursor_event(float x, float y)</div><div class="ttdoc">Respond to cursor events. </div><div class="ttdef"><b>Definition:</b> renderer.h:79</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Oct 10 2015 03:34:42 for CMU462 Library by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
